? $params['srvCache']
: new HashBagOStuff();
- $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null;
- $this->trxProfiler = isset( $params['trxProfiler'] )
- ? $params['trxProfiler']
- : new TransactionProfiler();
- $this->connLogger = isset( $params['connLogger'] )
- ? $params['connLogger']
- : new \Psr\Log\NullLogger();
- $this->queryLogger = isset( $params['queryLogger'] )
- ? $params['queryLogger']
- : new \Psr\Log\NullLogger();
+ $this->profiler = $params['profiler'];
+ $this->trxProfiler = $params['trxProfiler'];
+ $this->connLogger = $params['connLogger'];
+ $this->queryLogger = $params['queryLogger'];
+ // Set initial dummy domain until open() sets the final DB/prefix
+ $this->currentDomain = DatabaseDomain::newUnspecified();
+
if ( $user ) {
$this->open( $server, $user, $password, $dbName );
} elseif ( $this->requiresDatabaseUser() ) {